{% extends "admin/change_list.html" %}
{% load i18n admin_urls static admin_list %}

{% block result_list %}
    {{ block.super }}  {# 显示原有的列表 #}

    {% if totals %}
    <div class="results">
        <table>
            <thead>
                <tr>
                    <th colspan="2" style="text-align: right; font-weight: bold;padding: 10px 10px">总计：</th>
                    <th></th>
                    <th style="font-weight: bold">总入库数量：<span style="color: red">{{ totals.total_store_num }}</span> 当前页：<span style="color: red">{{ page_totals.total_store_num }}</span></th>  {# 对应store_num #}
                    <th></th>  {# unit #}
                    <th></th>  {# price #}
                    <th style="font-weight: bold">总金额：<span style="color: red">{{ totals.total_amount|floatformat:2 }}</span>当前页：<span style="color: red">{{ page_totals.total_amount|floatformat:2 }}</span></th>  {# amount #}
                    <th></th>  {# tax #}
                    <th style="font-weight: bold">总含税金额：<span style="color: red">{{ totals.total_tax_inclusive|floatformat:2 }}</span>当前页：<span style="color: red">{{ page_totals.total_tax_inclusive|floatformat:2 }}</span></th>  {# tax_inclusive_amount #}
                    <th style="font-weight: bold">总税额：<span style="color: red">{{ totals.total_tax_amount|floatformat:2 }}</span>当前页：<span style="color: red">{{ page_totals.total_tax_amount|floatformat:2 }}</span></th>  {# tax_amount #}
                    <th colspan="7"></th>  {# 其他不需要总计的列 #}
                </tr>
            </thead>
        </table>
    </div>
    {% endif %}
{% endblock %}